package com.ExaminStudy;

import java.util.Scanner;

public class DemoPerson {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int age=sc.nextInt();//年龄
        String gender=sc.next();
        String dno=sc.next();
        int age1=sc.nextInt();//驾龄
        Person person=new Driver(Driver.name,age,gender,dno,age1);
        person.show();
        person.info();
    }
}
class Person{

    String name;  //姓名

    int age;  //年龄

    String gender;//性别


    Person(String name, int age, String gender){

        this.name = name;

        this.age = age;

        this.gender = gender;

    }

    public Person() {

    }
    public void info(){};

    protected void show(){

        System.out.println("姓名： " + name);

        System.out.println("年龄： " + age);

        System.out.println("性别： " + gender);

    }

}
class Driver extends Person{
    String dno;//编号
     int age;//驾龄
   final static String name="张三";


    public Driver(String name, int age, String gender, String dno, int age1) {
        super(name, age, gender);
        this.dno = dno;
        this.age = age1;
    }


    protected void show(){
        System.out.println("姓名： " + name);

        System.out.println("年龄： " + super.age);

        System.out.println("驾龄： " + this.age);
    }
    public void info(){
        super.show();
        System.out.println("驾照编号："+dno);
        System.out.println("驾龄："+ this.age);
    }
}
